#include <iostream>
#include <stdlib.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/wait.h>
extern char** environ;
using namespace std;
int main(int argc,char* argv[],char* envp[])
{
for(int i=0;environ[i];i++)
{
cout<<environ[i]<<endl;


}

//bincout<<getenv("SHELL")<<endl;

/*while(1)
{

}*/

/*pid_t pid=fork();
if(pid==0)
{
//子进程
while(1)
{




}


}
else{
//父进程
int status=0;
waitpid(pid,&status,0);
cout<<"退出码是:"<<((status>>8)&0xFF)<<"信号是:"<<(status&0x7F)<<endl;


}*/
  return 0;
}
